package com.wangwei.authoritySystem.service;

import com.wangwei.authoritySystem.pojo.Department;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wangwei.authoritySystem.vo.DepartmentQueryVo;

import java.util.List;

/**
 *
 */
public interface DepartmentService extends IService<Department> {
    /**
     * 查询部门列表
     * @param departmentQueryVo
     * @return
     */
    List<Department> findDepartmentList(DepartmentQueryVo departmentQueryVo);

    /**
     * 查询上级部门列表
     * @return
     */
    List<Department> findParentDepartment();

    /**
     * 检查有无子部门
     * @return
     */
    int checkPid(Long id);

    /**
     * 检查部门下有无用户
     * @param id 部门id
     * @return
     */
    int checkUser(Long id);
}
